#pragma once

class CTextRender
{
public:
    CTextRender(void);
    ~CTextRender(void);

    int Render(HDC hDC, LPCTSTR lpString, int nCount, LPRECT lpRect, UINT uFormat);
    int Render(HDC hDC, LPCTSTR lpString, int nCount, LPRECT lpRect, UINT uFormat, BYTE byTextAlpha);

protected:
    BOOL    EnsureBuffer(int nWidth, int nHeight);
    BOOL    PrepareRender(int nWidth, int nHeight);
    void    DestroyBuffer();

protected:
    BITMAP  m_Bmp;

    HDC     m_hBufferDC;
    HBITMAP m_hBufferBmp;
};
